package com.lebang.service.buss;

import com.lebang.entity.LbbFloatSwitch;
import com.lebang.mapper.LbbFloatSwitchMapper;
import com.lebang.model.vo.buss.AppFloatSwitchVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * 应用版本
 *
 * @author weizx
 * @className AppStoreService
 * @date 2018年7月17日 下午6:24:50
 */
@Service
public class AppFloatSwitchService {

    @Autowired
    private LbbFloatSwitchMapper lbbFloatSwitchMapper;

    public Map<String, Object> pagging(AppFloatSwitchVo vo) {
        Integer total = lbbFloatSwitchMapper.total(vo);
        List<Map<String, Object>> rows = lbbFloatSwitchMapper.pagging(vo);
        Map<String, Object> data = new LinkedHashMap<>();
        data.put("total", total);
        data.put("rows", rows);
        return data;
    }

    public int update(LbbFloatSwitch aw) {
        return lbbFloatSwitchMapper.update(aw);
    }


    public LbbFloatSwitch getByCategory(String category) {
        return lbbFloatSwitchMapper.getByCategory(category);
    }
}
